<%@page pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%@page import="java.sql.Date"%>
<%@page import="com.dangdang.dao.*"%>
<%@page import="com.dangdang.domain.*"%>
<%
	request.setCharacterEncoding("utf-8");
	List<Book> bookList = null;
	String bookName = (request.getParameter("name"));
	String bookAuthor = (request.getParameter("author"));
	String bookPublisher = (request.getParameter("publisher"));
	int categoryId = Integer.parseInt(request.getParameter("categoryId"));
	BookDao bd = new BookDao();
	bookList = bd.getBook(categoryId,bookName, bookAuthor, bookPublisher);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link href="../css/style.css" type="text/css" rel="stylesheet" />
	</head>

	<body topMargin="10">
		<div id="append_parent"></div>

		<table cellSpacing="6" cellPadding="2" width="100%" border="0">
			<tbody>
				<tr>
					<td>
						<table class="guide" cellSpacing="0" cellPadding="0" width="100%"
							border="0">
							<tbody>
								<tr>
									<td>
										&nbsp;
									</td>
								</tr>
							</tbody>
						</table>
						<br />

						<form action="delete.jsp"
							onsubmit="return confirm('确认删除')">

							<table class="tableborder" cellSpacing="0" cellPadding="0"
								width="100%" border="0">
								<tbody>
									<tr class="header">
										<td class="altbg1">
											<b>&nbsp;</b>
										</td>
										<td class="altbg1">
											<b>书&nbsp;&nbsp;&nbsp;&nbsp; 名</b>
										</td>
										<td class="altbg1">
											<b>作&nbsp;&nbsp;&nbsp;&nbsp; 者</b>
										</td>
										<td class="altbg1">
											<b>出版时间</B>
										</td>
										<td class="altbg1">
											<b>出版社</B>
										</td>
										<td class="altbg1">
											<b>单价</B>
										</td>
									</tr>
								</tbody>
								<tbody>

									<%
									for(Book b : bookList){	
									 %>
									<tr>
										<td class="altbg2">
											<input type="checkbox" name="bookId" value="<%=b.getId() %>" />
										</td>
										<td class="altbg2">
											<b><%=b.getName() %></b>
										</td>	
										<td class="altbg2">
											<b><%=b.getAuthor() %></b>
										</td>
										<td class="altbg2">
											<b><%=b.getPublishDate() %></b>
										</td>
										<td class="altbg2">
											<b><%=b.getPublisher() %></b>
										</td>
										<td class="altbg2">
											<b><%=b.getPrice()  %> $</b>
										</td>
									</tr>
									<%
									}
									%>
								</tbody>
							</table>
							<br />
							<center>
								<input class="button" type="button" value="查询书籍"
									name="settingsubmit" onclick="location= 'search.jsp'" ;/>
							</center>
						</form>
					</td>
				</tr>
			</tbody>
		</table>

	</body>
</html>
